\documentclass[11pt]{article}
\setcounter{tocdepth}{5}
\begin{document}

\tableofcontents

\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\paragraph{A paragraph}
\subparagraph{A subparagraph}

\section{B section}
\subsection{B subsection}
\subsubsection{B subsubsection}
\paragraph{B paragraph}
\subparagraph{B subparagraph}

\end{document}
